var mapIds = [867201180];
var 准备地图 = 867201050;

function init() {}

function setup(c, a) {
    em.setProperty("state", 1);
    em.setProperty("leader", "true");
    var c = em.newInstance("莫奈德_地图_Act2.5_收集小白结晶");
    for (var b = 0; b < mapIds.length; b++) {
        var d = c.setInstanceMap(mapIds[b])
    }
    return c
}

function onItemPickedUp(c, b, d) {
    var a = b.getItemAmount(d);
    if (d == 4036382) {
        if (a == 10) {
            b.getAPI().addPopupSay(9400582, 3000, "#face0#话说回来，是不是要再申请下支援啊？", "", 0);
            b.getAPI().addPopupSay(9400582, 3000, "#face0#不知道要不要让他们再派些救护队过来。", "", 0);
            b.getAPI().addPopupSay(0, 3000, "#b救护队……你把扎奈特这样的治疗师叫做救护队？", "", 0);
            b.getAPI().addPopupSay(9400582, 3000, "#face0#嗯嗯- 她们可是我们亚皮纳斯的圣女啊。", "", 0);
            b.getAPI().addPopupSay(9400582, 3000, "#face0#不管我们再怎么努力战斗，只要有救护队的祝福和祈祷，大家就都只关注她们了……切", "", 0);
            b.getAPI().addPopupSay(0, 3000, "#face0#没错-所以我对她们讨厌不起来啊。其实她们也挺可怜的。虽然表面上看起来十分美丽优雅，但其实要消耗很多体力。所以她们经常很疲惫。", "", 0);
            b.getAPI().addPopupSay(9400582, 3000, "#face0#据说，她们都是从小就被选出来，然后接受训练……这还真是让人感到同情啊。", "", 0);
            b.getAPI().addPopupSay(9400582, 3000, "#face0#总之！你也对她们亲切点！", "", 0)
        } else {
            if (a >= 30) {
                b.getAPI().addPopupSay(9400582, 3000, "搞定！咱们快回去找艾丽卡。", "", 0)
            }
        }
    }
}

function onPlayerRegistered(b, a) {
    a.setReviveCount(-100);
    b.startEventTimer(30 * 60 * 1000)
}

function onPlayerRevived(b, a) {
    return false
}

function onMapChanged(c, b, a) {
    if (mapIds.indexOf(a) < 0) {
        on玩家退场(c, b, false);
        return
    }
    em.setProperty("kill", "0");
    em.setProperty("clear", "0");
    em.setProperty("curMap", a)
}

function onPlayerDisconnected(b, a) {
    on玩家退场(b, a, false);
    return 0
}

function onTimeOut(a) {
    a.getPlayers().forEach(function (b) {
        on玩家退场(a, b, true)
    })
}

function onMonsterKilled(a, b) {}

function onPlayerRevived(b, a) {
    return false
}

function onPartyDisbanded(a) {}

function onPlayerKilled(b, a) {}
var setupTask;

function randomNum(b, a) {
    switch (arguments.length) {
        case 1:
            return parseInt(Math.random() * b + 1, 10);
            break;
        case 2:
            return parseInt(Math.random() * (a - b + 1) + b, 10);
            break;
        default:
            return 0;
            break
    }
}

function initProp(a, b) {
    if (em.getProperty(a) == null) {
        em.setProperty(a, b)
    }
}

function initPropArray(a, d, c, e) {
    for (var b = c; b <= e; b++) {
        if (em.getProperty(a + "_" + b) == null) {
            em.setProperty(a + "_" + b, d)
        }
    }
}

function on玩家退场(c, b, a) {
    c.disposeIfPlayerBelow(a ? 999 : 0, 准备地图);
    em.getProperties().clear();
    em.setProperty("state", 0);
    em.setProperty("leader", "true");
    c.unregisterPlayer(b)
};